var toolbar = new Object();
var imagePath = './js/ABT/images/'

toolbar.hoverState = true;

//悬浮改变
toolbar.hoverFn = function (dom, style) {
    if (toolbar.hoverState) {
        $(dom).children('i').attr({
            style: style //高亮背景图
        });
        toolbar.hoverState = false;
    }
};

toolbar.config = {
    baiduaddress: 'http://218.4.136.122:3333/EpointWebBuilder/rest/frontAppNotNeedLoginAction/getBaiduToken', //百度语音接口
    openSound: '您已打开无障碍工具条', //打开无障碍语音配置
    //适老模式
    oldstate: {
        style: 'background:url(' + imagePath + 'new-icon1.jpg)  no-repeat center', //默认背景图
        hoverState: true,
        onmousemove: function (i) {
            toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon1-ac.jpg) no-repeat center');
        },
        onmouseout: function (i) {
            $(i).children('i').attr({
                style: 'background:url(' + imagePath + 'new-icon1.jpg)  no-repeat center' //默认背景图
            });
            toolbar.hoverState = true;
        },
        show: true, //是否显示
        oldUrl: 'http://127.0.0.1:5502/index.html' //高等模式链接
    },
    //指读模式
    overSound: {
        style: 'background:url(' + imagePath + 'new-icon2.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (!toolbar.Function.overSoundMode.overSoundModeState) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon2-ac.jpg) no-repeat center');
            }
        },
        onmouseout: function (i) {
            if (!toolbar.Function.overSoundMode.overSoundModeState) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon2.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon2-st.jpg)  no-repeat center', //选中样式
        show: true //是否显示
    },
    //语音播报模式
    continuous: {
        starSound: '即将开始语音播报', //开始播报前的语音播报
        starTimes: 3000, //几秒后开始语音播报
        style: 'background:url(' + imagePath + 'new-icon3.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (!toolbar.Function.continuous.continuous) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon3-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (!toolbar.Function.continuous.continuous) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon3.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon3-st.jpg)  no-repeat center', //选中样式
        show: true //是否显示
    },
    //语速调整
    speed: {
        defaultSpeed: 5, //默认语速
        highSpeed: 15, //加快语速
        lowSpeed: 1, //缓慢语速
        style: 'background:url(' + imagePath + 'new-icon4.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (toolbar.Function.speed.speed == '中' || toolbar.Function.speed.speed == 0) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon4-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (toolbar.Function.speed.speed == '中' || toolbar.Function.speed.speed == 0) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon4.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon4-quick.jpg)  no-repeat center',
        statebg1: 'background:url(' + imagePath + 'new-icon4-slow.jpg)  no-repeat center',
        show: true //是否显示
    },
    //大指针
    mouse: {
        style: 'background:url(' + imagePath + 'new-icon5.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (!toolbar.Function.mouse.mouseState) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon5-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (!toolbar.Function.mouse.mouseState) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon5.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon5-st.jpg)  no-repeat center',
        show: true //是否显示
    },
    //页面缩放
    pageZoom: {
        style: 'background:url(' + imagePath + 'new-icon6.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (toolbar.cookie.getCookie('pageZoomState') == 1 || toolbar.cookie.getCookie('pageZoomState') === null) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon6-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (toolbar.cookie.getCookie('pageZoomState') == 1 || toolbar.cookie.getCookie('pageZoomState') === null) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon6.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon6-st1.jpg)  no-repeat center',
        statebg1: 'background:url(' + imagePath + 'new-icon6-st2.jpg)  no-repeat center',
        statebg2: 'background:url(' + imagePath + 'new-icon6-st3.jpg)  no-repeat center',
        show: true //是否显示
    },
    //字体缩放
    fontZoom: {
        style: 'background:url(' + imagePath + 'new-icon7.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon7-ac.jpg) no-repeat center'); //悬浮图
        },
        onmouseout: function (i) {
            if (toolbar.cookie.getCookie('fontZoomState') == 0 || toolbar.cookie.getCookie('fontZoomState') === null) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon7.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon7-st1.jpg)  no-repeat center',
        statebg1: 'background:url(' + imagePath + 'new-icon7-st2.jpg)  no-repeat center',
        statebg2: 'background:url(' + imagePath + 'new-icon7-st3.jpg)  no-repeat center',
        show: true //是否显示
    },
    //高对比度
    hightContrast: {
        style: 'background:url(' + imagePath + 'new-icon8.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (toolbar.Function.hightContrast.hightContrastState == -1) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon8-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (toolbar.Function.hightContrast.hightContrastState == -1) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon8.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon8-st1.jpg)  no-repeat center',
        statebg1: 'background:url(' + imagePath + 'new-icon8-st2.jpg)  no-repeat center',
        statebg2: 'background:url(' + imagePath + 'new-icon8-st3.jpg)  no-repeat center',
        statebg3: 'background:url(' + imagePath + 'new-icon8-st4.jpg)  no-repeat center',
        show: true //是否显示
    },
    //辅助线
    guides: {
        style: 'background:url(' + imagePath + 'new-icon9.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (!toolbar.Function.guides.guidesState) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon9-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (!toolbar.Function.guides.guidesState) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon9.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon9-st.jpg)  no-repeat center',
        show: true //是否显示
    },
    //超大字幕
    textTips: {
        style: 'background:url(' + imagePath + 'new-icon10.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (!toolbar.Function.textTips.textGetState) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon10-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (!toolbar.Function.textTips.textGetState) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon10.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon10-st.jpg)  no-repeat center',
        show: true //是否显示
    },
    //纯文本模式
    textMode: {
        style: 'background:url(' + imagePath + 'new-icon16.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            if (!toolbar.Function.textMode.textModeState) {
                toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon16-ac.jpg) no-repeat center'); //悬浮图
            }
        },
        onmouseout: function (i) {
            if (!toolbar.Function.textMode.textModeState) {
                $(i).children('i').attr({
                    style: 'background:url(' + imagePath + 'new-icon16.jpg)  no-repeat center' //默认背景图
                });
                toolbar.hoverState = true;
            }
        },
        statebg0: 'background:url(' + imagePath + 'new-icon11-st.jpg)  no-repeat center',
        show: true, //是否显示
        callback: function () {
            //文本模式回调
            //文字放大
            // toolbar.Function.fontZoom.mainMethod();
        }
    },
    //帮助
    help: {
        style: 'background:url(' + imagePath + 'new-icon13.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon13-ac.jpg) no-repeat center'); //悬浮图
        },
        onmouseout: function (i) {
            $(i).children('i').attr({
                style: 'background:url(' + imagePath + 'new-icon13.jpg)  no-repeat center' //默认背景图
            });
            toolbar.hoverState = true;
        },
        show: true //是否显示
    },
    //使用引导
    guidance: {
        style: 'background:url(' + imagePath + 'new-icon12.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon12-ac.jpg) no-repeat center'); //悬浮图
        },
        onmouseout: function (i) {
            $(i).children('i').attr({
                style: 'background:url(' + imagePath + 'new-icon12.jpg)  no-repeat center' //默认背景图
            });
            toolbar.hoverState = true;
        },
        show: true //是否显示
    },
    //重置
    resetToolbar: {
        style: 'background:url(' + imagePath + 'new-icon14.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon14-ac.jpg) no-repeat center'); //悬浮图
        },
        onmouseout: function (i) {
            $(i).children('i').attr({
                style: 'background:url(' + imagePath + 'new-icon14.jpg)  no-repeat center' //默认背景图
            });
            toolbar.hoverState = true;
        },
        show: true //是否显示
    },
    show: {
        style: 'background:url(' + imagePath + 'new-icon15.jpg)  no-repeat center', //默认背景图
        onmousemove: function (i) {
            toolbar.hoverFn(i, 'background:url(' + imagePath + 'new-icon15-ac.jpg) no-repeat center'); //悬浮图
        },
        onmouseout: function (i) {
            $(i).children('i').attr({
                style: 'background:url(' + imagePath + 'new-icon15.jpg)  no-repeat center' //默认背景图
            });
            toolbar.hoverState = true;
        },
        show: true //是否显示
    }
};

//移动端配置
